package com.hbsoft.sub;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.Paint;
import java.util.Vector;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.table.DefaultTableModel;

import com.ant4j.popularize.ui.MainFrame;

public class AccountAboutPanel extends JPanel
{
	private JScrollPane jsp = null;
	private DefaultTableModel model = null;
	private JTable table = null;
	private Font f = null;
	
	private JPanel center = null;
	private AccountPasswordResetPanel aprp = null;
	private AddSysAccountPanel addAcount = null;
	public AccountAboutPanel()
	{
		this.setLayout(new BorderLayout());
		f = new Font("������κ",0,19);
		
		initWest();
		initCenter();
		
	}
	
	private void initWest()
	{
		
		Vector<String> v = new Vector<String>();
		v.add("�˻����");
		v.add("ϵͳ�˻�");
		
		model = new DefaultTableModel(v,28);
		table = new JTable();
		table.setModel(model);
		table.getTableHeader().setReorderingAllowed(false);
		table.getTableHeader().setBackground(Color.gray);
		table.getTableHeader().setFont(f);
		table.setSelectionMode(0);
		table.setFont(new Font("dialog",0,15));
		
		table.getColumn("�˻����").setMaxWidth(90);
		table.getColumn("�˻����").setMinWidth(90);
		
		Dimension d = this.getToolkit().getScreenSize();
		int h = (int) d.getHeight() - 30;
		
		jsp = new JScrollPane(table);
		jsp.setPreferredSize(new Dimension(300,h));
		this.add(jsp,BorderLayout.WEST);
	}
	
	private void initCenter()
	{
		center = new JPanel();
		center.setLayout(new BorderLayout());
		
		aprp = new AccountPasswordResetPanel();
		addAcount = new AddSysAccountPanel();
		JPanel p = new JPanel();
		p.setLayout(new BorderLayout());
		center.add(aprp,BorderLayout.NORTH);
		p.add(addAcount,BorderLayout.NORTH);
		center.add(p,BorderLayout.CENTER);
		
		this.add(center,BorderLayout.CENTER);
	}
	
	
	
}
